package com.autumn.common.api.domain.values;

/**
 * 字符常最项目值
 * 
 * @author 杨昌国 2018-11-24 22:37:39
 */
public class StringConstantItemValue extends ConstantItemValue<String> {

	/**
	 * 
	 */
	private static final long serialVersionUID = -192659313514490416L;

	/**
	 * 实例化 StringConstantItemValue
	 * 
	 * @param value
	 *            值
	 * @param name
	 *            名称
	 * @param explain
	 *            说明
	 */
	public StringConstantItemValue(String value, String name, String explain) {
		super(value, name, explain);
	}

	/**
	 * 实例化
	 * 
	 * @param value
	 *            值
	 * @param name
	 *            名称
	 * @param explain
	 *            说明
	 * @param order
	 *            顺序
	 */
	public StringConstantItemValue(String value, String name, String explain, int order) {
		super(value, name, explain, order);
	}

	@Override
	public int compareTo(ConstantItemValue<String> o) {
		if (this.getOrder() == o.getOrder()) {
			return this.getValue().compareTo(o.getValue());
		}
		return Integer.compare(this.getOrder(), o.getOrder());
	}

}
